package com.ymttest.database.mapping.thirdpartysync;

import com.ymttest.database.model.thirdpartysync.syncuserinfo;
import com.ymttest.database.model.thirdpartysync.syncuserinfoExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface syncuserinfoMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table syncuserinfo
     *
     * @mbggenerated Mon Nov 04 17:08:29 CST 2019
     */
    @SelectProvider(type=syncuserinfoSqlProvider.class, method="countByExample")
    int countByExample(syncuserinfoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table syncuserinfo
     *
     * @mbggenerated Mon Nov 04 17:08:29 CST 2019
     */
    @DeleteProvider(type=syncuserinfoSqlProvider.class, method="deleteByExample")
    int deleteByExample(syncuserinfoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table syncuserinfo
     *
     * @mbggenerated Mon Nov 04 17:08:29 CST 2019
     */
    @Delete({
        "delete from syncuserinfo",
        "where UserId = #{userId,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer userId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table syncuserinfo
     *
     * @mbggenerated Mon Nov 04 17:08:29 CST 2019
     */
    @Insert({
        "insert into syncuserinfo (UserId, OpenId)",
        "values (#{userId,jdbcType=INTEGER}, #{openId,jdbcType=VARCHAR})"
    })
    int insert(syncuserinfo record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table syncuserinfo
     *
     * @mbggenerated Mon Nov 04 17:08:29 CST 2019
     */
    @InsertProvider(type=syncuserinfoSqlProvider.class, method="insertSelective")
    int insertSelective(syncuserinfo record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table syncuserinfo
     *
     * @mbggenerated Mon Nov 04 17:08:29 CST 2019
     */
    @SelectProvider(type=syncuserinfoSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="UserId", property="userId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="OpenId", property="openId", jdbcType=JdbcType.VARCHAR)
    })
    List<syncuserinfo> selectByExample(syncuserinfoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table syncuserinfo
     *
     * @mbggenerated Mon Nov 04 17:08:29 CST 2019
     */
    @Select({
        "select",
        "UserId, OpenId",
        "from syncuserinfo",
        "where UserId = #{userId,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="UserId", property="userId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="OpenId", property="openId", jdbcType=JdbcType.VARCHAR)
    })
    syncuserinfo selectByPrimaryKey(Integer userId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table syncuserinfo
     *
     * @mbggenerated Mon Nov 04 17:08:29 CST 2019
     */
    @UpdateProvider(type=syncuserinfoSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") syncuserinfo record, @Param("example") syncuserinfoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table syncuserinfo
     *
     * @mbggenerated Mon Nov 04 17:08:29 CST 2019
     */
    @UpdateProvider(type=syncuserinfoSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") syncuserinfo record, @Param("example") syncuserinfoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table syncuserinfo
     *
     * @mbggenerated Mon Nov 04 17:08:29 CST 2019
     */
    @UpdateProvider(type=syncuserinfoSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(syncuserinfo record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table syncuserinfo
     *
     * @mbggenerated Mon Nov 04 17:08:29 CST 2019
     */
    @Update({
        "update syncuserinfo",
        "set OpenId = #{openId,jdbcType=VARCHAR}",
        "where UserId = #{userId,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(syncuserinfo record);
}